/**
 * 
 */
package org.ordobill.opensource.telegram.main;

import org.ordobill.opensource.telegram.config.FileConfig;
import org.ordobill.opensource.telegram.config.property.ConfigProperty;
import org.ordobill.opensource.telegram.input.FileSplit;
import org.ordobill.opensource.telegram.input.ObjectSplit;

/**
 * @author Choi Jin Wook(A.K.A Brian Choi @ Ordobill Office) / choijinwook84@gmail.com
 *
 */
public class RunningMethod {

    /**
     * @param args
     * @throws Exception 
     */
    public static void main(String[] args) throws Exception {

        String telegram = "11   2222/22/3222233333";
        //String telegram = "11223222233333     5";

        ConfigProperty cfg = new ConfigProperty();
        cfg.setSplitChar("/");
        //cfg.setSplitInt(new Integer[]{2,2,10});

        ObjectSplit osp = new ObjectSplit(cfg);
        FileSplit   fsp = new FileSplit(new FileConfig("configure.ini"));
        
        osp.setTelegram(telegram);
        fsp.setTelegram(telegram);

        TestProperty otp = (TestProperty)osp.genericWrapper("org.ordobill.opensource.telegram.main.TestProperty");
        System.out.println("TestProperty1 AA : "+otp.getAa());
        System.out.println("TestProperty1 BB : "+otp.getBb());
        System.out.println("TestProperty1 CC : "+otp.getCc());
        
        TestProperty ftp = (TestProperty)fsp.genericWrapper(new TestProperty());
        System.out.println("TestProperty2 AA : "+ftp.getAa());
        System.out.println("TestProperty2 BB : "+ftp.getBb());
        System.out.println("TestProperty2 CC : "+ftp.getCc());
                
                
        
    }

}
